package com.szu.subject.ui.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.szu.subject.domains.College;
import com.szu.subject.ui.mapper.CollegeMapper;
import com.szu.subject.ui.service.CollegeService;
@Service
public class CollegeServiceImpl implements CollegeService {

	@Autowired
	private CollegeMapper collegeMapper;
	
	@Override
	public List<College> getAllColleges() {
		return collegeMapper.getAllColleges();
	}

	@Override
	public College getCollegeByPK(Long id) {
		return collegeMapper.getCollegeByPK(id);
	}

	@Override
	public College createCollege(College college) {
		collegeMapper.createCollege(college);
		return college;
	}

	@Override
	public College updateCollege(College college) {
		collegeMapper.updateCollege(college);
		return college;
	}

	@Override
	public int deleteCollege(Long id) {
		return collegeMapper.deleteCollege(id);
	}

	@Override
	public List<College> batchCreateColleges(List<College> colleges) {
		collegeMapper.batchCreateColleges(colleges);
		return colleges;
	}

	@Override
	public List<College> batchUpdateColleges(List<College> colleges) {
		collegeMapper.batchUpdateColleges(colleges);
		return colleges;//原本return null
	}

	@Override
	public int batchDeleteColleges(List<Long> ids) {
		return collegeMapper.batchDeleteColleges(ids);
	}

}
